# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Francois Boulogne <fboulogne at april dot org>

pkgname=python-argh
pkgver=0.28.1
_commit=1872281cce5d554a0ce3c340e24261a7741712cc
pkgrel=2
pkgdesc="An unobtrusive argparse wrapper with natural syntax"
arch=(any)
url="https://pypi.python.org/pypi/argh"
license=('LGPL3')
depends=('python')
optdepends=('python-argcomplete: for completion')
makedepends=('git' 'python-build' 'python-installer' 'python-flit-core')
checkdepends=('python-pytest' 'python-argcomplete' 'python-iocapture')
source=("git+https://github.com/neithere/argh.git#commit=$_commit")
sha256sums=('SKIP')

build() {
  cd argh
  python -m build -nw
}

check() {
  cd argh
  PYTHONPATH=src pytest
}

package() {
  cd argh
  python -m installer -d "$pkgdir" dist/*.whl
}
